SQL Server 2008 comes with a new command-line application, ssbdiagnose.exe.
You use this advanced utility to monitor SSB conversations or to check
application configuration status, both across databases and between
computers. It supports a variety of authentication and configuration
options and generates either plain text or XML as its output.
The general syntax for ssbdiagnose.exe has three parts:
You can leverage the full syntax of ssbdiagnose.exe by simply executing it from the command line with no options (it is located in the folder [SQL Server installation root]\[version number]\Tools\Binn). To run it, open a command window (run the CMD.exe program) and then navigate to your installation location using the CD command. As an exercise, you can execute any of the examples that follow.
In the following example, you connect to the current SSB application and check on the services’ configuration status. Remember that the application lives in two databases (AdventureWorks2008 and XCatMgmt),
so you need to provide parameters to check on both sides of the service
contract. Because the service and contract names are quite long, we
suggest enclosing the command-line contents in a batch file and running
it from there.
Execute the following command, substituting connection credentials with those appropriate for your environment:
SSBDiagnose.exe
-U SSBTestUserName -P SSBTestUserName CONFIGURATION FROM SERVICE
"//samspublishing.com/SS2008/SSB/Services/CatalogChangeInitiatorService"
-S localhost\SQL08 -d AdventureWorks2008 TO SERVICE
"//samspublishing.com/SS2008/SSB/Services/CatalogMaintenanceService"
-S localhost\SQL08 -d XCatMgmt ON CONTRACT
"//samspublishing.com/SS2008/SSB/Contracts/BasicCatalogChangeContract"
If you’ve executed all the sample code and listings in this chapter, you should see no errors in the ssbdiagnose.exe output. For troubleshooting, refer to the next section to learn how to explore the system catalogs for SSB.
Now
that you have a sense of what you can accomplish with this utility, you
should take some time to explore it further by monitoring the status of
a conversation of the service you set up in the XBikeDistribution database. Further information is available in the MSDN article “ssbdiagnose Utility.”